#define _CRT_SECURE_NO_WARNINGS 1 
#include<stdio.h>

int main()
{
	int a = 0; int b = 0; int c = 0; 
	int d = 0; int i = 0;
	int* p1 = &a;
	int* p2 = &b;
	int* p3 = &c;
	int* p4 = &d;
	int* arr[4] = { p1,p2,p3,p4 };
	char ch[] = "0";
	char str[] = "0";
	scanf("%s", str);    /*"xue1xi2C3yu4yang"*/
	char* pb = ch;
	char* p = str;




	while (*p != '\0')
	{
		if (*p >= '0' && *p <= '9')
		{
			*arr[i] = (*p-'0');
			i++;
		}
		else
		{
			*pb = *p;
			pb++;
		}
		p++;
	}
	*pb = '\0';




	for (i = 0; i < 4; i++)
	{
		printf("%d ", *arr[i]);
	}
	printf("\n");
	printf("%s\n", ch);
	return 0;
}